package com.imoney.framework.hession.spring;

import com.caucho.hessian.client.HessianProxyFactory;
import com.imoney.framework.base.utils.ReflectUtils;

public class HessianProxyFactoryBean extends
		org.springframework.remoting.caucho.HessianProxyFactoryBean {

	public void setConnectTimeout(int connectTimeOut) {
		try {
			HessianProxyFactory proxyFactory = (HessianProxyFactory) ReflectUtils
					.getValueByFieldName(this, "proxyFactory");
			proxyFactory.setConnectTimeout(connectTimeOut);
		} catch (Exception e) {
			throw new RuntimeException("set connectTimout throws Excepton,", e);
		}
	}

}
